package com.override;

/**
 * Time    : 2023/3/16 19:41
 * Author  : 王摇摆
 * FileName: Learn_Override.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class Learn_Override {
    public static void main(String[] args) {
        Son son = new Son();
        son.fly();
    }
}

class Father {
    public void fly() {
        System.out.println("Father can fly!");
    }

    public void say() {
        System.out.println("Father say hello!");

    }
}

class Son extends Father{
//    @Override
    public void fly() {
        super.fly();
        System.out.println("Son can also fly!");
    }

    @Override
    public void say() {
        super.say();
    }
}